// const joi = require('@hapi/joi')
const joi = require("joi");

const id =  joi.required();
const product_id = joi.required();
const product_name = joi.required();
const product_category = joi.required();
const product_unit = joi.required();
const product_inwarehouse_number = joi.required();
const product_single_price = joi.required();
const product_create_person = joi.required();
const in_memo = joi.required();



exports.reg_addProduct_schema = {
    // 表示需要对 req.body 中的数据进行验证
    body: {
        product_id,
        product_name,
        product_category,
        product_unit,
        product_inwarehouse_number,
        product_single_price,
        product_create_person,
        in_memo
    },
}

exports.reg_editProduct_schema = {
    // 表示需要对 req.body 中的数据进行验证
    body: {
        id,
        product_name,
        product_category,
        product_unit,
        product_inwarehouse_number,
        product_single_price,
        in_memo
    },
}
